package ru.ifmo.thesis.domain;

import ru.ifmo.thesis.quantities.Kilometers;

public class SimpleGeoService extends AbstractGeoService {
	
	SimpleGeoService(String address, double latitude, double longtitude) {
		setOfficeLocation(getLocation(address, latitude, longtitude));
	}

	private int nextLocationId = 0;
	
	@Override
	public Kilometers<Double> distance(Location first, Location second) {
		return distanceInternal(first, second);
	}

	@Override
	public Location getLocation(String address, double latitude, double longtitude) {
		return new Location(nextLocationId++, address, latitude, longtitude);
	}

}
